package com.ruoyi.gcgl.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gcgl.mapper.GcQualityRecordsMapper;
import com.ruoyi.gcgl.domain.GcQualityRecords;
import com.ruoyi.gcgl.service.IGcQualityRecordsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 质量事故调查Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-02
 */
@Service
public class GcQualityRecordsServiceImpl implements IGcQualityRecordsService 
{
    @Autowired
    private GcQualityRecordsMapper gcQualityRecordsMapper;

    /**
     * 查询质量事故调查
     * 
     * @param id 质量事故调查主键
     * @return 质量事故调查
     */
    @Override
    public GcQualityRecords selectGcQualityRecordsById(Long id)
    {
        return gcQualityRecordsMapper.selectGcQualityRecordsById(id);
    }

    /**
     * 查询质量事故调查列表
     * 
     * @param gcQualityRecords 质量事故调查
     * @return 质量事故调查
     */
    @Override
    public List<GcQualityRecords> selectGcQualityRecordsList(GcQualityRecords gcQualityRecords)
    {
        return gcQualityRecordsMapper.selectGcQualityRecordsList(gcQualityRecords);
    }

    /**
     * 新增质量事故调查
     * 
     * @param gcQualityRecords 质量事故调查
     * @return 结果
     */
    @Override
    public int insertGcQualityRecords(GcQualityRecords gcQualityRecords)
    {
        return gcQualityRecordsMapper.insertGcQualityRecords(gcQualityRecords);
    }

    /**
     * 修改质量事故调查
     * 
     * @param gcQualityRecords 质量事故调查
     * @return 结果
     */
    @Override
    public int updateGcQualityRecords(GcQualityRecords gcQualityRecords)
    {
        return gcQualityRecordsMapper.updateGcQualityRecords(gcQualityRecords);
    }

    /**
     * 批量删除质量事故调查
     * 
     * @param ids 需要删除的质量事故调查主键
     * @return 结果
     */
    @Override
    public int deleteGcQualityRecordsByIds(String ids)
    {
        return gcQualityRecordsMapper.deleteGcQualityRecordsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除质量事故调查信息
     * 
     * @param id 质量事故调查主键
     * @return 结果
     */
    @Override
    public int deleteGcQualityRecordsById(Long id)
    {
        return gcQualityRecordsMapper.deleteGcQualityRecordsById(id);
    }
}
